package com.baseweb.webadmin.core.util;

import org.apache.commons.codec.binary.Base64;

public class DecodeWiUtil {
    /**
     * 反解WI
     * */
    public static String decode(String wi) {
        String decodeWi = "";
        if (wi != null && wi.length() >= 10) {
            decodeWi = new StringBuffer(wi.substring(0, 5)).reverse().toString() + wi.substring(5);
            byte[] b = Base64.decodeBase64(decodeWi);
            decodeWi = new String(b);
        }
        return decodeWi;
    }
}
